package com.wjx.user_consumer.service;

import com.wjx.user_consumer.model.Appointment;
import com.wjx.user_consumer.model.Rating;
import com.wjx.user_consumer.model.Serve;
import com.wjx.user_consumer.model.User;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.List;

@Component
public class UserServiceFallback implements UserService{

    public User login(String username) {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return null;
    }
    public int register(String username, String password,String authority)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return 0;
    }
    public List<Serve> showService()    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return null;
    }
    public List<Serve> search(String keyword)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return null;
    }
    public Serve queryServiceById(int id)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return null;
    }
    public List<Rating> queryRatingByServiceId(int id)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return null;
    }
    public User queryUserById(int id)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return null;
    }
    public int addAppointment(int userId, int serviceId, String appointmentTime,
                              String appointmentLocation, String phone, String status,
                              String createdTime, String lastUpdatedTime)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return 0;
    }
    public List<Appointment> queryAppointmentByUserId(int id)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return null;
    }
    public int updateScoreById(int id,int score,String feedback,String lastUpdatedTime)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return 0;
    }
    public Rating queryRatingById(int id)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return null;
    }
    public int deleteRatingById(int id)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return 0;
    }
    public Rating queryRatingByAppointmentId(int appointmentId)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return null;
    }
    public int addRating(int serviceId,int appointmentId,int userId,int score,
                         String feedback,String createdTime,String lastUpdatedTime)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return 0;
    }
    public int updateUserById(int id,String username,String password,String authority)    {
        System.out.println("Hello,我是Hystrix,user-provider服务出现了异常");
        return 0;
    }
}
